<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>cms</title>

  <%--http://localhost:8080/cms/index.jsp--%>
  <%--http://localhost:8080/cms/resources/layui/css/layui.css--%>
  <%-- http://localhost:8080/cms/user/list.do --%>
  <%--http://localhost:8080/cms/user/resources/layui/css/layui.css   --%>
  <%-- pageContext.request.contextPath  /cms --%>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">CMS</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->

    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img  id="userImg" onerror="javascript:this.src='${pageContext.request.contextPath}/resources/default.jpg'" src="${pageContext.request.contextPath}/${user.img}" class="layui-nav-img">
          ${user.realname}
        </a>
      </li>
      <li class="layui-nav-item"><a href="${pageContext.request.contextPath}/user.do?service=logout" id="logout">退了</a></li>
    </ul>
  </div>

  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">信息管理</a>
          <dl class="layui-nav-child">
            <c:if test="${user.role == 1}">
              <dd><a href="page.do?service=userList" target="content">员工管理</a></dd>
            </c:if>
            <dd><a href="page.do?service=customerList" target="content">客户管理</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a href="javascript:;">系统管理</a>
          <dl class="layui-nav-child ">
            <dd><a  href="page.do?service=updatePwd" target="content" >修改密码</a></dd>
            <dd><a href="page.do?service=updateImg" target="content">修改头像</a></dd>
          </dl>
        </li>
      </ul>
    </div>
  </div>

  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;height: 100%" >
      <iframe name="content" style="width: 100%;height: 100%;border: 0px"></iframe>
    </div>
  </div>

  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © 武汉尚学堂-20201130
  </div>
</div>
<script src="${pageContext.request.contextPath}/resources/layui/layui.js"></script>
<script>
  //JavaScript代码区域
  layui.use('element', function(){
    var element = layui.element;

  });
</script>
</body>
</html>
